<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class FileUpload</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class FileUpload</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">FileUpload</p>
<p class="description"><p>Assists with the uploading of files. At this time it will only work on images (jpg, jpeg) due to that being the only forseeable need</p></p>
		<p class="notes">
			Located in <a class="field" href="_functions.php.html">/functions.php</a> (line <span class="field">219</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<span class="var-type">integer</span>
					<a href="#$MAX_SIZE" title="details" class="var-name">$MAX_SIZE</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																												
												<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#isImg" title="details" class="method-name">isImg</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#todatabase" title="details" class="method-name">todatabase</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$img</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#todisk" title="details" class="method-name">todisk</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$MAX_SIZE" id="$MAX_SIZE"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">integer</span>
			<span class="var-name">$MAX_SIZE</span>
			 = <span class="var-default"> 5242880</span>			(line <span class="line-number">224</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> Used as the maximum file size we will allow. For us it will be 5MB by default.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodisImg" id="isImg"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isImg</span> (line <span class="line-number">232</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">isImg</p>
<p class="description"><p>Used to check if a file seems to be a valid jpeg</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			isImg
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: The name of the file as used in the FORM</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtodatabase" id="todatabase"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">todatabase</span> (line <span class="line-number">301</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">todatabase</p>
<p class="description"><p>Used to get the data for the blob, which is inserted in the database</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Returns the data for the database or FALSE</li>
				<li><span class="field">link:</span> <a href="http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx">http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			todatabase
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$img</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$img</span><span class="var-description">: The name as used in the form</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtodisk" id="todisk"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">todisk</span> (line <span class="line-number">260</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">todisk</p>
<p class="description"><p>Moves a file from the temporary directory to a destination</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			todisk
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$file</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$dir</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$file</span><span class="var-description">: The name of the upload element from the form</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$dir</span><span class="var-description">: The path to save the file. Do not end it in /</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sun, 18 Apr 2010 10:58:12 -0500 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>